import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String str=in.nextLine();
            int cur=str.lastIndexOf(' ');
            String ret=(String) str.subSequence(cur+1,str.length());
            System.out.println(ret.length());
        }
    }
    public static int firstUniqChar(String s) {
        char[] str=new char[26];
        for(int i=0;i<s.length();i++) {
            int ch=s.charAt(i);
            str[ch-97]++;
        }
        for(int i=0;i<s.length();i++) {
            int ch=s.charAt(i)-'a';
            if(str[ch]==1) {
                return i;
            }
        }
        return -1;
    }

    public static void main1(String[] args) {
        int ret=firstUniqChar("leetcode");
        System.out.println(ret);
    }
    public int StrToInt(String str) {
        if(str.length()==0) {
            return 0;
        }
        int flg=1;
        String ret="";
        char ch;
        for(int i=0;i<str.length();i++) {
            ch=str.charAt(i);
            if('0'<=ch && ch<='9') {
                ret=ret+ch;
            }else if(ch == '+' || ch=='-'){
                if(str.charAt(0)=='-') {
                    flg=-1;
                }
            }else {
                return 0;
            }
        }
        if(ret.length()==0){
            return 0;
        }
        int s=Integer.valueOf(ret);
        return flg*s;
    }
}
